<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" id="first">
<input type="text" id="second">
<input type="button" onclick="add(x,y)">
<script>
    var x=document.valueOf().getElementById("first").toString();
    var y=document.valueOf().getElementById("second").toString();

    var m = function (a,b){
        return a+b;
    };
    console.log(m(2,3));//通过变量名调用
    console.log(add(1,2))//普通调用
    function add(a,b) {
        return a*b;
    }
    (function () {
        console.log("我调用我自己");//我调用我自己
    })();
</script>

</body>
</html>